<?php

use fw\base\Conf;
use fw\tool\Url;

?>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="Keywords" content="<?php echo Conf::$all['seo_keyword']; ?>">
    <meta name="description" content="<?php echo Conf::$all['seo_desc']; ?>">
    <title>文章 - <?php echo Conf::$all['title']; ?></title>
    <link rel="icon" href="<?php echo Url::root(); ?>assets/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="<?php echo Url::root(); ?>assets/lib/normalize.css">
    <link rel="stylesheet" href="<?php echo Url::root(); ?>assets/front/default.css">
    <style>
        .master > section {
            padding: 14px 0;
        }

        .master .title:hover {
            color: #111;
        }

        .master .title {
            margin: 10px 0;
            color: #4A4A4A;
            font-size: 23px;
            font-weight: lighter;
            letter-spacing: 1px;
        }

        .master .widget {
            margin: 14px 0;
        }

        .master .widget > .tag {
            display: inline-block;
        }

        .master .widget > .tag > a {
            display: inline-block;
            margin: 0 4px;
        }

        .master .bottom {
            margin: 10px 0;
        }
    </style>
</head>
<body>

<main>
    <?php require Conf::$all['view_path'] . 'base/aside.php'; ?>
    <article class="master">
        <header>
            <h1>那么，挖矿咯。</h1>
        </header>
        <?php foreach ($data as $fo): ?>
            <section>
                <h2 class="title">
                    <?php echo $fo['title']; ?>
                </h2>
                <div class="widget">
                    <?php echo date('Y-d-m', $fo['create_time']); ?>
                    <div class="tag">
                        <?php
                        if (!empty($fo['tags'])) {
                            echo '<span>&nbsp;#&nbsp;</span>';
                            $tag_arr = explode(',', $fo['tags']);
                            foreach ($tag_arr as $tag) {
                                echo '<a href="">' . $tag . '</a>';
                            }
                        }
                        ?>
                    </div>
                </div>
                <div class="summary">
                    <?php echo mb_substr($fo['brief'], 0, 90); ?>
                </div>
                <div class="bottom">
                    <a href="<?php echo Url::to('Art/view', ['art_id' => $fo['art_id']]); ?>">阅读全文>></a>
                </div>
            </section>
        <?php endforeach; ?>
        <footer class="page clear">
            <?php echo $page_show; ?>
        </footer>
    </article>
</main>

<script src="<?php echo Url::root(); ?>assets/lib/jquery.js"></script>
<script src="<?php echo Url::root(); ?>assets/front/default.js"></script>

</body>
</html>
